package com.github.yealove.configgen.exception;

import cn.hutool.core.collection.CollUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Collections;
import java.util.List;

public class Assert {

    public static void assertNotNull(Object obj, String message) {
        if (obj == null) {
            throw new ConfigGenException(-1, message);
        }
    }

    public static void assertNotEmpty(List list, String message) {
        if (CollUtil.isEmpty(list)) {
            throw new ConfigGenException(-1, message);
        }
    }
}
